<!doctype html><html><head><meta charset="utf-8" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=false" />
<meta name="keywords" content="" /> 
<meta name="description" content="" />
<title>LEKO&trade;</title>
<link rel="icon" type="image/ico" href="favicon.ico" />
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
<link rel="stylesheet" type="text/css" href="leko.css" />
<link rel="stylesheet" type="text/css" href="leko.demo.css" />
<link rel="alternate" type="application/rss+xml" title="" href="leko.xml" />
<script src="jquery.js"></script><script src="leko.js"></script><script src="leko.gradient.js"></script></head><body><div id="page" class="table"><header><nav></nav></header><h2 class="en">jQuery.fn.gradient</h2><hr />为元素提供当鼠标移入移出<span class="en">(mouseenter|mouseleave)</span>或焦点获得失去<span class="en">(focusin|focusout)</span>时的由一个或一组CSS属性指定的颜色逐渐变换的动态效果。完整支持CSS3色彩定义。<section><h4><b>语法</b></h4><code><i>jQuery</i> = <strong>jQuery</strong>(<i>selector</i>).<strong>gradient</strong>({<i>css</i> , [<i>live</i>] , [<i>focus</i>] , [<i>speed</i>] , [<i>fx</i>] , [<i>disabled</i>]})</code></section><section><h4><b>参数</b></h4><table border="0" cellspacing="0" cellpadding="0"><thead><tr class="row1"><th class="col2">参数名</th><th class="col2">是否可选</th><th class="col2">缺省值</th><th class="col2">数据类型</th><th class="col2">可能的取值</th><th>说明</th></tr></thead><tbody><tr><td rowspan="1" class="en">css</td><td class="en" rowspan="1"></td><td class="en" rowspan="1"></td><td rowspan="1" class="en">object</td><td class="en"></td><td>要应用动态转换效果的样式表属性及其目标值的键值对。支持下列属性：<br /><br /><ol class="en">
<li>color</li>
<li>backgroundColor</li>
<li>borderColor</li>
<li>borderBottomColor</li>
<li>borderLeftColor</li>
<li>borderRightColor</li>
<li>borderTopColor</li>
<li>outlineColor</li>
</ol><br /><mark>注意：元素如果在:hover和:focus等Pseudo-classes中也定义了相应属性，会干扰动态效果的正常运行。</mark></td></tr><tr class="odd"><td rowspan="2" class="en">live</td><td class="en" rowspan="2">√</td><td class="en" rowspan="2">undefined</td><td rowspan="1" class="en">string</td><td class="en"></td><td>效果将以jQuery的live方式绑定到当前序列元素的由此selector指定的内部元素————包括当前已有的和未来创建的。</td></tr><tr class="odd"><td rowspan="1" class="en">undefined</td><td class="en"></td><td>效果将绑定到当前元素。</td></tr><tr><td rowspan="2" class="en">focus</td><td class="en" rowspan="2">√</td><td class="en" rowspan="2">false</td><td rowspan="2" class="en">boolean</td><td class="en">true</td><td>效果绑定到鼠标移入移出(focusin|focusout)事件对。</td></tr><tr><td class="en">false</td><td>效果绑定到鼠标移入移出(mouseenter|mouseleave)事件对。</td></tr><tr class="odd"><td rowspan="4" class="en">speed</td><td class="en" rowspan="4">√</td><td class="en" rowspan="4">800</td><td rowspan="3" class="en">string</td><td class="en">slow</td><td>预设的速度级别。相当于600ms</td></tr><tr class="odd"><td class="en">normal</td><td>预设的速度级别。相当于400ms</td></tr><tr class="odd"><td class="en">fast</td><td>预设的速度级别。相当于200ms</td></tr><tr class="odd"><td rowspan="1" class="en">number</td><td class="en"></td><td>精确指定速度的整数数值。单位为毫秒。</td></tr><tr><td rowspan="1" class="en">fx</td><td class="en" rowspan="1">√</td><td class="en" rowspan="1">swing</td><td rowspan="1" class="en">string</td><td class="en"></td><td>要应用的缓动函数名称。参见<a class="en" href="jQuery.easing.html"> jQuery.easing </a>对象。</td></tr><tr class="odd"><td rowspan="2" class="en">disabled</td><td class="en" rowspan="2">√</td><td class="en" rowspan="2">false</td><td rowspan="2" class="en">boolean</td><td class="en">true</td><td>禁用当前插件效果。</td></tr><tr class="odd"><td class="en">false</td><td>启用当前插件效果。</td></tr></tbody></table></section><section><h4><b>返回</b></h4><table border="0" cellspacing="0" cellpadding="0"><thead><tr class="row2"><th class="col2">数据类型</th><th class="col2">可能的取值</th><th>说明</th></tr></thead><tbody><tr><td rowspan="1" class="en">jQuery</td><td class="en">this</td><td></td></tr></tbody></table></section><script>$(function(){$("button").click(function(){eval($(this).prev().prev().text());});});</script><section><h4><b>示例</b></h4><pre>$(&quot;div#me&quot;).gradient({
    css:{
        color:&quot;green&quot;
    }
});</pre><br /><pre>$(&quot;body&quot;).gradient({
    live:&quot;a&quot;,
    css:{
        color:&quot;red&quot;,
        backgroundColor:&quot;blue&quot;
    }
});</pre><br /><pre>$(&quot;form&quot;).gradient({
    live:&quot;input:text&quot;,
    focus:true,
    css:{
        borderColor:&quot;green&quot;
    }
});</pre></section><section><h4><b>实例</b></h4><ol><li><a href="jQuery.fn.gradient.0.html">测试用例演示</a></li></section><section><h4><b>文件</b></h4><ol class="en"><li><a href="jquery.js">jquery.js</a> (70.48KB)</li><li><a href="leko.js">leko.js</a> (20.68KB)</li><li class="within"><a href="leko.gradient.js">leko.gradient.js</a> (0.90KB)</li></ol></section><footer><section id="foot"><hr /><h6>苏昱(苏小雨)作品<br />灵镭信息科技，创造代码之美</h6><a class="en" href="http://www.lekolite.cn" target="_blank">Copyright © 2010 lekolite.cn , All rights reserved</a></section></footer></div></body></html>